<?php

namespace App\Http\Controllers\Api;

use App\Transformers\RoleTransformer;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;

class RoleController extends Controller
{
    public function index(){
        $role = Role::create(['name' => '1215']);  // 创建角色
        return $this->response->created($role,"创建成功");
    }
}
